package com.papers.system.service;

import com.papers.common.core.domain.PageQuery;
import com.papers.common.core.domain.R;
import com.papers.common.core.domain.entity.SysUser;
import com.papers.common.core.page.TableDataInfo;
import com.papers.system.domain.TJuanCourse;
import com.papers.system.domain.bo.TJuanCourseBo;
import com.papers.system.domain.dto.TJuanCourseDto;
import com.papers.system.domain.dto.TJuanUserCourseDto;
import com.papers.system.domain.vo.TJuanCourseListVo;
import com.papers.system.domain.vo.TJuanCourseVo;
import com.papers.system.domain.vo.TJuanMajorTreeVo;
import com.papers.system.domain.vo.TJuanTkTotal;

import java.util.Collection;
import java.util.List;

/**
 * 课程Service接口
 *
 * @author papers
 * @date 2022-10-12
 */
public interface ITJuanCourseService {

    /**
     * 查询课程
     */
    TJuanCourseVo queryById(String courseId);

    /**
     * 查询课程列表
     */
    TableDataInfo<TJuanCourseVo> queryPageList(TJuanCourseDto dto, PageQuery pageQuery);

    /**
     * 查询课程列表
     */
    List<TJuanCourseListVo> queryList(TJuanCourseBo bo);

    /**
     * 新增课程
     */
    Boolean insertByBo(TJuanCourseBo bo);

    /**
     * 修改课程
     */
    Boolean updateByBo(TJuanCourseBo bo);

    /**
     * 校验并批量删除课程信息
     */
    Boolean deleteWithValidByIds(Collection<String> ids, Boolean isValid);

    int CourseCodeUnique(TJuanCourseBo bo);

    /**
     * 查询课程
     *
     * @param courseSubject
     * @return
     */
    TJuanCourse getOne(String courseSubject);

    R getCourseByMajorId();

    /**
     * 导入 课程
     *
     * @param list
     */
    void save(List<TJuanCourseListVo> list);

    /**
     * 查询 专业树
     *
     * @return
     */
    List<TJuanMajorTreeVo> getMajorTreeList();

    TableDataInfo<SysUser> selectAllocatedList(PageQuery pageQuery,  TJuanUserCourseDto dto);

    TableDataInfo<SysUser> selectUnallocatedList(PageQuery pageQuery, TJuanUserCourseDto dto);

    void deleteBindUsers(String courseId,String[] userIds);

    int insertBindUsers(String courseId, String[] userIds);

    R getTreeAndCourse();

    List<TJuanTkTotal> tikuTotal();

    R mergeCourse(String mainId, List<String> ids);

    String checkCourseCode(TJuanCourseBo bo);

    List<TJuanTkTotal> getStatisticsByTotal(TJuanCourseDto dto);

}
